How can you ensure that you have a successful installation of Versant? Check the following things:
-
1. Check the TCP/IP 'services' file.
-
This file associates a service name with a socket and also specifies the socket type. The Versant oscssd service needs to be assigned a tcp socket on your system. The default is to use 5019 as the socket number. This can be changed if that number is already in use by another service, but if possible you should use the default value. The services file is located in the /etc directory and should contain an entry for oscssd. The entry should read as follows:
oscssd 5019/tcp
-
2. Check the TCP/IP 'inetd.lst' file.
-
This file tells the inetd daemon which services to associate with which daemon. Versant uses a service named oscssd, so this file must be associated with the Versant daemon in inetd. Inetd reads the inetd.lst file to get this type of information for the services it supports. This file should contain an entry for oscssd that looks like this:
oscssd tcp c:\versant\3_0_14\bin\SS.EXE
This file is usually located in the c:\tcpip\etc directory. You can manually edit this file if the installation program did not update it for you.
-
3. Check the Versant SYSINFO file.
-
This file contains the default Versant environment parameters for the machine. The general format for the file is an environment parameter followed by a value for the parameter. This file is located under the Versant directory tree in the lib directory. An example of what goes in this file would be:
VERSANT_DB c:\versant\db
VERSANT_DBID c:\versant\db
VERSANT_DBID_NODE myserver
VERSANT_USER john
-
4. Run the `oscp -i` command.
-
This program checks the Versant environment settings. It looks at your environment variables, the sysinfo file and the TCP/IP setup files to get the values for the Versant environment parameters. You should verify that all paths and values are correct.
The output of the command will look something like this:
[krist@phi]oscp -i
Versant Product Version: 3.0.14
Versant Root Path: c:\versant
Versant Runtime Path: c:\versant\3_0_14\os2
Versant DB Directory: c:\versant\db
Versant osc-dbid node name: myserver
Versant osc-dbid path: c:\versant\db
VERSANT_ROOT: c:\versant
VERSANT_DB: c:\versant\db
VERSANT_DBID: c:\versant\db
Versant ss.d Location: c:\versant\3_0_14\os2\bin\ss.exe
-
5. Run the `oscp -i @` command.
-
should be the name of the machine you have just installed Versant on. This tests the two-process communication. Some possible errors that you could receive at this point are 3004, 3009, 3020. These errors indicate that the TCP/IP configuration files have not been set up properly. Check that the services and inetd.conf files have been set up properly.
-
6. Run `makedb testdb` command.
-
This command merely creates the database directory, but it is necessary for the next step.
-
7. Run `createdb testdb` command.
-
This will actually create the database, pre-allocating space, creating system classes, and registering the new database's database id in the osc-dbid file. If the osc-dbid file did not get created properly during installation, you should see error E7031: UT_ER_DBID_NOACCESS: Failed to access database ID file. You can use the
dbid -N command to create an osc-dbid file.
If an osc-dbid file did get created during installation, or if you are using an osc-dbid file on another server and you still get this error, then something is wrong with your environment. Rerun the oscp -i command to see where Versant thinks the osc-dbid file is. Also make sure you have the proper access privileges to the file.
-
8. Run `db2tty -d testdb` command.
-
This is another test of the two-process model. The db2tty program is compiled using the Versant 2-process libraries. It does a regular `beginsession' on the database and then outputs the contents of the database to stdout. It is useful not only to look at the contents of a database, but also as a test of the Versant installation since it is written similar to user-built applications.
-
9. Compile and run the demo & tutorial programs.
-
Copy one of the demo programs into a temporary directory. You should copy the entire directory. Then compile and run the program. If you are unable to compile, check that your compiler is installed correctly and that it is in your path..